package tech.horgee.aoptest;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Limit
    @RequestMapping("test")
    public MyResult test(String username, String password) {
        if ("123".equals(password)) {
            return MyResult.success();
        }
        throw MyCode.ERROR_PASSWORD.toException();
//        return MyCode.ERROR_PASSWORD.toResult();
    }
}
